<template>
  <!--datav装饰-->
  <componentBox :id="id" :ref="id" :option="config.location">
      <div
        :key="key"
        :is="option.borderComponentName"
        v-bind="option"
      ></div>
  </componentBox>
</template>

<script>
  import * as u from '@/util/util'
  export default {
    name: "screen_chart_decoration",
    components: {
      'componentBox': () => import('@/components/screen/componentBox.vue'),
    },
    props: {
      id: String,
      config: Object,
    },
    watch:{
      config:{
        handler(newVal){
          this.option=u.copyBean(this.config.option);
          this.key++;
        },
        deep:true,
      }
    },
    data() {
      return {
        //重置
        key:0,
        option: {},
      }
    },
    created() {
      this.option = this.config.option;
    }
  }
</script>

<style scoped>
</style>
